package com.vermouth.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.vermouth.service.DemoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @Reference(interfaceClass = DemoService.class)
    private DemoService demoService;

    @GetMapping(value = "/add")
    public int add(int a, int b) {
        return demoService.add(a, b);
    }
}
